Add support for running go-transcode on Windows #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I know this probably isn't very high on your list, but I have a use case for on-demand transcoding on Windows, couldn't find any other existing project doing this as easily as this one, and it works with some minor changes, so… here we go!
Let me know what you think and how you want to proceed with this. I see this primarily as a test balloon, to figure out whether changes like this are something you're interested in merging upstream?
I could understand if this isn't something you want to deal with (and I'm probably not interested in maintaining this long-term either). I guess I'd just use my fork for my upcoming project and not open further pull requests related to Windows-support.
Some technical notes:
Really the only platform-dependent bits of code were the process group management. I've replaced those with Windows-specific versions, although I haven't fully tested them, because I'm not entirely sure how they're used. (I've pressed
Ctrl-C
on a running instance once and it seemed to terminate the running ffmpeg instances. But then again, I think they were normal individual processes, so I don't see the need for project groups yet.)Also, the build configuration for Linux and other non-Windows platforms is completely untested.
I believe I also got stream support working, by mashing together some of the bash scripts into a Windows Batch file and replacing that one bit where it concats
.sh
to the profile name with.cmd
. However, I'm only doing VOD and I just found out, that I apparently don't even need those bash scripts, so it isn't included here.Note that this is the first time I've written or built any Go, so my code is probably not very idiomatic. Suggestions (including required reading) welcome.